<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>审核管理- 用户审核详情</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link rel="shortcut icon" href="../favicon.ico">
    <link href="__PUBLIC__/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__PUBLIC__/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="__PUBLIC__/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="__PUBLIC__/css/animate.css" rel="stylesheet">
    <link href="__PUBLIC__/css/style.css?v=4.1.0" rel="stylesheet">
    <!--	<link rel="stylesheet" href="__PUBLIC__/css/liandong.css"/>-->
    <link href="__PUBLIC__/Widget/webuploader/0.1.5/webuploader.css" rel="stylesheet" type="text/css" />
    <script src="__PUBLIC__/js/plugins/layer/laydate/laydate.js"></script>
    <style>
        .img{ width: auto !important; max-width: 128px; max-height: 128px; }
        .img2{ width: auto !important; max-width: 64px; max-height: 64px; }
        .img_default{ width: auto !important; max-width: 128px; max-height: 128px; }
        .video-box{ width: 300px; height: 200px; }
        .video-box video{ width: 100% !important; height: 100% !important; border:1px solid #eee; }
        .control-label.control-label-l{ text-align: left; }
        .clients-list .tab-pane{ height: inherit; min-height: 300px; padding: 30px 0;  }
        .clients-list .tab-pane .full-height-scroll{ }
    </style>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>审核管理- <small><{$columnname}></small>
                    </h5>
                </div>
                <div class="ibox-content">
                    <form method="post" class="form-horizontal" onsubmit="return false">
                        				<div class="form-group">
                                            <label class="col-sm-2 control-label">编号</label>
                                            <div class="col-sm-10 control-label" style="text-align: left;">
                                            <{$data.id}>
                                            </div>
                                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">审核信息</label>
                            <div class="col-sm-10">
                                <div class="clients-list">
                                    <div class="tab-content">
                                        <div id="tab-2" class="tab-pane active">
                                                    <if condition="$data.video_state neq '1' or $data.video_cover_state neq '1'">
                                                        <div class="full-height-scroll">
                                                            <div class="form-group">
                                                                <label class="col-sm-2 control-label">视频封面</label>
                                                                <div class="col-sm-10">
                                                                    <div  class="product_img">
                                                                        <if condition="$data.video_img neq null && $data.video_img neq ''">
                                                                            <img id="inputfile-img" alt='未找到图片' src="<{$data.video_img}>" class="img">
                                                                            <else />
                                                                            <img id="inputfile-img" alt='未找到图片' src="__PUBLIC__/img/webuploader.png" class="img_default">
                                                                        </if>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <div class="form-group">
                                                                <label class="col-sm-2 control-label">视频</label>
                                                                <div class="col-sm-10 control-label" style="text-align: left;">
                                                                    <if condition="$data.video neq null && $data.video neq ''">
                                                                        <div class="video-box">
                                                                            <video src="<{$data.video}>" controls="controls">
                                                                                Your browser does not support the video element.
                                                                            </video>
                                                                        </div>
                                                                        <else />
                                                                        未上传
                                                                    </if>
                                                                </div>
                                                            </div>
                                                            <div class="form-group">
                                                                <label class="col-sm-2 control-label">状态</label>
                                                                <div class="col-sm-10 control-label" style="text-align: left;">
                                                                    <{$data.video_state_text}>
                                                                </div>
                                                            </div>
                                                            <if condition="$data.state eq '4'">
                                                                <div class="form-group">
                                                                    <label class="col-sm-2 control-label">驳回理由</label>
                                                                    <div class="col-sm-10 control-label" style="text-align: left;">
                                                                        <{$data.content}>
                                                                    </div>
                                                                </div>
                                                            </if>
                                                            <if condition="$data.state gt '2'">
                                                                <div class="form-group">
                                                                    <label class="col-sm-2 control-label">审核时间</label>
                                                                    <div class="col-sm-10 control-label" style="text-align: left;">
                                                                        <{$data.video_ptime}> &emsp;&emsp;
                                                                    <button class="btn btn-danger" type="button" onclick="delete_video('<{$uid}>', '2', '<{$data.id}>' )">删除</button>
                                                                    </div>
                                                                </div>
                                                            </if>
                                                            <div class="form-group">
                                                                <label class="col-sm-2 control-label">上传时间</label>
                                                                <div class="col-sm-10 control-label" style="text-align: left;">
                                                                    <{$data.video_ctime}>
                                                                </div>
                                                            </div>
                                                            <if condition="$data.state elt '2'">
                                                                <div class="hr-line-dashed"></div>
                                                                <div class="form-group">
                                                                    <div class="col-sm-4 col-sm-offset-2">
                                                                        <button class="btn btn-info" type="button" onclick="check_video('<{$uid}>', '1', '<{$data.id}> ')">通过</button>&nbsp;&nbsp;&nbsp;
                                                                        <button class="btn btn-danger" type="button" onclick="disagree_video_alert('<{$uid}>', '2', '<{$data.id}>' )">驳回</button>
                                                                    </div>
                                                                </div>
                                                            </if>

                                                        </div>
                                                    </if>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">用户信息</label>
                            <div class="col-sm-10">
                                <div style="padding: 15px 0; border:1px solid #cfdadd;">
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">头像</label>
                                        <div class="col-sm-9 control-label control-label-l">
                                            <if condition="$data.user_logo neq null && $data.user_logo neq ''"><img alt="未找到图片" class="img2" src="<{$data.user_logo}>" /></if>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label"><{$app_name2}>号</label>
                                        <div class="col-sm-9 control-label" style="text-align: left;">
                                            <{$data.user_id}>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">用户昵称</label>
                                        <div class="col-sm-9 control-label" style="text-align: left;">
                                            <{$data.user_name}>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">性别</label>
                                        <div class="col-sm-9 control-label" style="text-align: left;">
                                            <{$data.user_sex_text}>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">手机号码</label>
                                        <div class="col-sm-9 control-label" style="text-align: left;">
                                            <{$data.user_phone}>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="ibox-content disagree-content" style="display: none;">
    <form method="post" class="form-horizontal" onsubmit="return false">
        <div class="form-group">
            <div class="col-sm-12">
                <textarea id="txtdisagreeremark" name="txtdisagreeremark" class="form-control" placeholder="请输入驳回理由" style="height:72px;"></textarea>
            </div>
        </div>
    </form>
</div>
<!--  全局js -->
<script src="__PUBLIC__/js/jquery.min.js?v=2.1.4"></script>
<script src="__PUBLIC__/js/bootstrap.min.js?v=3.3.6"></script>
<script src="__PUBLIC__/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<!-- 自定义js -->
<script src="__PUBLIC__/js/content.js?v=1.0.0"></script>
<script src="__PUBLIC__/js/plugins/layer/layer.min.js"></script>
<!--	<script src="__PUBLIC__/js/liandong.js"></script> -->
<script src="__PUBLIC__/js/ajaxfileupload.js"></script>
<script src="__PUBLIC__/Widget/webuploader/0.1.5/webuploader.min.js"></script>
<!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
<script>
    $(function () {
        $('.full-height-scroll').slimScroll({
            height: '100%'
        });
    });
</script>
<script>
    var uid = "<{$uid}>";
    var phone = "<{$phone}>";
    var state = "<{$data.state}>"
    var uservideosidentitysubmit = "<{:U('uservideosidentitysubmit','','')}>";
    var uservideosidentitydelete = "<{:U('uservideosidentitydelete','','')}>"
    var uservideosidentitylist = "<{:U('uservideosidentitylist','','')}>"
    $logoimg.change("propertychange", function () {
        ajaxFileUpload();
    });
    function check_video(uid, type, videoid) {
        check(uid, type, videoid);
    }
    function check(uid,otype, videoid, remark) {
        layer.confirm('确定' + (otype == '1' ? '通过' : '驳回') + '该信息吗？', function (index) {
            layer.close(index);
            $.post(uservideosidentitysubmit, {'uid': uid, 'videoid': videoid, 'otype': otype, 'content': remark},
                function (data) {
                    if (data.ret == '1001') {
                        layer.msg(data.code, {icon: 6, time: 1000});
                        setTimeout(function () {
                            window.location.reload();
                        }, 1000);
                    } else {
                        layer.msg(data.code, {icon: 5, time: 1500});
                    }
                }, 'json');
        });
    }
    function disagree_video_alert(uid, type, videoid) {
        disagree_alert(uid, type, videoid);
    }
    function disagree_alert(uid, otype,  videoid) {
        var $content = $('.disagree-content');
        var $txtdisagreeremark = $content.find('#txtdisagreeremark');
        $txtdisagreeremark.val('');
        //页面层
        layer.open({
            title: '输入驳回理由',
            type: 1,
            skin: 'layui-layer-rim', //加上边框
            btn: ['确定', '取消']
            , yes: function (index, layero) {
                var disagreeremark = $txtdisagreeremark.val();
                if (disagreeremark == "") {
                    layer.alert('请输入驳回理由！\r\n', {title: '提示框', icon: 0});
                    return false;
                }
                check(uid,  otype, videoid,disagreeremark);
//			$.post(useridentitysubmit, {'uid': uid, 'type': type, 'otype': otype, 'content': disagreeremark},
//				function (data) {
//				    if (data.ret == '1001') {
//					layer.close(index);
//					layer.msg(data.code, {icon: 6, time: 1500});
//					setTimeout(function () {
//					    window.location.reload();
//					}, 1500);
//				    } else {
////						layer.close(index);
//					layer.msg(data.code, {icon: 5, time: 1500});
//				    }
//				}, 'json');
            }, cancel: function () {
                //右上角关闭回调
            },
            area: ['320px', '228px'], //宽高
            content: $content
        });
    }
    function delete_video(uid, otype, videoid) {
        layer.confirm('确定删除该视频吗？', function (index) {
            layer.close(index);
            $.post(uservideosidentitydelete, {'uid': uid, 'otype': otype, 'videoid' : videoid},
                function (data) {
                    if (data.ret == '1001') {
                        layer.msg(data.code, {icon: 6, time: 1000});
                        setTimeout(function () {
                            window.location.href= uservideosidentitylist+"/ddlstate/"+state;
                        }, 1000);
                    } else {
                        layer.msg(data.code, {icon: 5, time: 1500});
                    }
                }, 'json');
        });
    }
    function ajaxFileUpload() {
        $.ajaxFileUpload({
            url: imguploadsubmit, //你处理上传文件的服务端
            type: 'post',
            data: {phone: phone, type: 'self'},
            secureuri: false, //与页面处理代码中file相对应的ID值
            fileElementId: 'logoimg',
            dataType: 'JSON', //返回数据类型:TEXT，XML，JSON，HTML，SCRIPT，JSONP五种
            success: function (data, status) {
                var $inputfileimg = $("#inputfile-img");
                var $logosrc = $("#logosrc");
                var $logoimg = $("#logoimg");
                data = $(data).text();
                data = data.substring(0, data.indexOf('}') + 1);
                data = eval("(" + data + ")");
                if (data.ret == '1001') {
                    layer.msg(data.code, {icon: 6, time: 1000});
                    $inputfileimg.removeClass('img_default').addClass('img').attr('src', data.data);
                    $logosrc.val(data.data);
                } else {
                    layer.msg(data.code, {icon: 5, time: 1500});
                }
                $logoimg.change("propertychange", function () {//再次绑定
                    ajaxFileUpload();
                });
            },
            error: function (data, status, e) {
                alert(status);
            }
        });
        return false;
    }

</script>
</body>
</html>
